package com.jd.controller;


import com.jd.entity.Detail;
import com.jd.service.DetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * Created by Administrator on 2017/9/20/020.
 */
@Controller
@RequestMapping("detail")
public class DetailController {

    @Autowired
    private DetailService detailService;
    @RequestMapping("list")
    public String list(Model model,Integer oid){
        List<Detail> list = detailService.findByOid(oid);
        model.addAttribute("list",list);
        return "detail/list";
    }
}
